<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterXkClueFormatTime extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('xk_clue', function (Blueprint $table) {
            $table->unsignedBigInteger("formerOwner")->change();
            $table->unsignedBigInteger("owner")->change();
            $table->unsignedBigInteger("createdXkUserWid")->change();
            $table->unsignedBigInteger("updatedXkUserWid")->change();
            $table->string('getTime')->default("")->comment('获得时间')->after("lat");
            $table->dateTime('formatCreatedXkAt')->nullable(true)->comment('xk - 创建时间')->after("createdXkAt");
            $table->dateTime('formatUpdatedXkAt')->nullable(true)->comment('xk - 更新时间')->after("updatedXkAt");
            $table->dateTime('formatCreatedAt')->nullable(true)->comment('kf - 创建时间')->after("createdAt");
            $table->dateTime('formatUpdatedAt')->nullable(true)->comment('kf - 更新时间')->after("updatedAt");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('xk_clue', function (Blueprint $table) {
            $table->dropColumn([
                "getTime",
                "formatCreatedXkAt",
                "formatUpdatedXkAt",
                "formatCreatedAt",
                "formatUpdatedAt"
            ]);
        });
    }
}
